The following code is used to generate the data plots.

Importing CSVs

nfl2022 <- read.csv("nfl2022.csv", header = TRUE)
driveAvg <- read.csv("driveAvg2022.csv", header = TRUE)
passOff <- read.csv("passOff2022.csv", header = TRUE)
rushOff <- read.csv("rushOff2022.csv", header = TRUE)
scoreOff <- read.csv("scoreOff2022.csv", header = TRUE)

"I added the abbrevation column to each dataframe, this will make plotting, sorting, and organization easier."
## [1] "I added the abbrevation column to each dataframe, this will make plotting, sorting, and organization easier."
nfl2022 <- nfl2022[order(nfl2022$Tm, decreasing = FALSE), ]
driveAvg <- driveAvg[order(driveAvg$Tm, decreasing = FALSE), ]
passOff <- passOff[order(passOff$Tm, decreasing = FALSE), ]
rushOff <- rushOff[order(rushOff$Tm, decreasing = FALSE), ]
scoreOff <- scoreOff[order(scoreOff$Tm, decreasing = FALSE), ]

"In order to have the stats properly correspond to each team, I decided to use alphabetical order since it is the most consistent ordering between each data frame."
## [1] "In order to have the stats properly correspond to each team, I decided to use alphabetical order since it is the most consistent ordering between each data frame."
head(nfl2022)
##                   Tm Abv.  W  L T  W.L.  PF  PA   PD  MoV  SoS  SRS OSRS DSRS
## 30 Arizona Cardinals  ARI  4 13 0 0.235 340 449 -109 -6.4  0.2 -6.2 -1.9 -4.3
## 23   Atlanta Falcons  ATL  7 10 0 0.412 365 386  -21 -1.2 -0.9 -2.1 -0.1 -2.0
## 8  Baltimore Ravens+  BAL 10  7 0 0.588 350 315   35  2.1  1.1  3.1 -0.2  3.4
## 3     Buffalo Bills*  BUF 13  3 0 0.813 455 286  169 10.6  0.4 10.9  7.1  3.8
## 24 Carolina Panthers  CAR  7 10 0 0.412 347 374  -27 -1.6 -0.6 -2.2 -1.3 -0.9
## 32     Chicago Bears  CHI  3 14 0 0.176 326 463 -137 -8.1  1.6 -6.4 -2.5 -4.0
head(driveAvg)
##    Rk                Tm Abv.  G X.Dr Plays  Sc.  TO. Plays.1  Yds    Start Time
## 12 12 Arizona Cardinals  ARI 17  187  1176 32.1 12.8     6.3 29.2 Own 26.8 2:45
## 32 32   Atlanta Falcons  ATL 17  167  1042 39.5 11.4     6.2 32.3 Own 27.7 3:02
## 20 20  Baltimore Ravens  BAL 17  180  1095 38.9 11.7     6.1 32.0 Own 29.6 2:57
## 31 31     Buffalo Bills  BUF 16  171  1068 45.0 15.2     6.2 37.1 Own 30.0 2:47
## 14 14 Carolina Panthers  CAR 17  187  1009 35.3  9.6     5.4 27.9 Own 28.4 2:36
## 18 18     Chicago Bears  CHI 17  181  1020 34.3 12.7     5.6 28.7 Own 29.9 2:46
##     Pts
## 12 1.65
## 32 2.00
## 20 1.90
## 31 2.52
## 14 1.76
## 18 1.85
head(passOff)
##     X                Tm Abv.  G Cmp Att Cmp.  Yds TD TD. Int Int. Lng Y.A AY.A
## 18 18 Arizona Cardinals  ARI 17 433 664 65.2 3626 17 2.6  17  2.6  77 6.0  5.3
## 31 31   Atlanta Falcons  ATL 17 257 415 61.9 2699 17 4.1   9  2.2  75 7.1  6.9
## 28 28  Baltimore Ravens  BAL 17 300 488 61.5 3040 19 3.9  13  2.7  75 6.6  6.1
## 8   8     Buffalo Bills  BUF 16 361 574 62.9 4129 35 6.1  14  2.4  98 7.5  7.6
## 29 29 Carolina Panthers  CAR 17 267 457 58.4 2996 16 3.5  13  2.8  75 7.1  6.5
## 32 32     Chicago Bears  CHI 17 223 377 59.2 2219 19 5.0  15  4.0  56 6.9  6.1
##     Y.C   Y.G Rate Sk Yds.1  Sk. NY.A ANY.A X4QC GWD     EXP.
## 18  9.2 213.3 79.2 46   340  6.5  5.1   4.5    1   1 -33.98\\
## 31 11.4 158.8 87.7 37   228  8.2  6.0   5.8    3   4  28.90\\
## 28 10.7 178.8 82.5 38   162  7.2  5.8   5.4    2   3   6.19\\
## 8  11.9 258.1 95.8 33   162  5.4  6.8   6.9    3   4 129.14\\
## 29 12.2 176.2 80.2 36   250  7.3  6.1   5.5    0   1 -18.72\\
## 32 11.7 130.5 80.3 58   379 13.3  5.1   4.4    1   2 -64.19\\
head(rushOff)
##   Rk                Tm Abv.  G Att  Yds TD Lng Y.A   Y.G Fmb   EXP
## 1 22 Arizona Cardinals  ARI 17 434 1873 15  45 4.3 110.2  25 16.79
## 2  3   Atlanta Falcons  ATL 17 559 2718 17  44 4.9 159.9  21 46.17
## 3  2  Baltimore Ravens  BAL 17 526 2720 14  79 5.2 160.0  21 48.10
## 4  9     Buffalo Bills  BUF 16 430 2232 15  44 5.2 139.5  24 33.20
## 5 10 Carolina Panthers  CAR 17 483 2210 16  60 4.6 130.0  29 26.76
## 6  1     Chicago Bears  CHI 17 558 3014 18  67 5.4 177.3  33 69.64
head(scoreOff)
##    Rk                Tm Abv.  G RshTD RecTD PR.TD KR.TD FblTD IntTD OthTD AllTD
## 31 31 Arizona Cardinals  ARI 17    15    17    NA    NA     2     3    NA    37
## 23 23   Atlanta Falcons  ATL 17    17    17    NA     1     1     1     1    38
## 3   3  Baltimore Ravens  BAL 17    14    19    NA     1    NA    NA    NA    34
## 2   2     Buffalo Bills  BUF 16    15    35    NA     2    NA     1    NA    53
## 19 19 Carolina Panthers  CAR 17    16    16    NA    NA     2     2    NA    36
## 32 32     Chicago Bears  CHI 17    18    19    NA    NA    NA    NA    NA    37
##    X2.00.PM X2PA D2P XPM XPA FGM FGA Sfty Pts Pts.G
## 31        5    9  NA  24  27  28  32   NA 340  20.0
## 23        3    3  NA  33  35  32  37    1 365  21.5
## 3         2    2  NA  31  32  37  43   NA 350  20.6
## 2         2    3  NA  48  50  27  31    2 455  28.4
## 19        1    4  NA  30  32  33  35   NA 347  20.4
## 32        1    5  NA  27  32  25  27   NA 326  19.2

Passing Success and Offensive Success

# Passing Attempts vs Offensive Rank
plot(passOff$Att, scoreOff$Pts.G, type = "n", xlab = "Num. of Passing Atts.", ylab = "Points per Game")
text(passOff$Att, scoreOff$Pts.G, labels = passOff$Abv.)

cor(passOff$Att, scoreOff$Pts.G)
## [1] 0.1469385
# Passing TDs vs Offensive Rank
plot(passOff$TD, scoreOff$Pts.G, type = "n", xlab = "Num. of Passing TDs", ylab = "Points per Game")
text(passOff$TD, scoreOff$Pts.G, labels = passOff$Abv)

cor(passOff$TD, scoreOff$Pts.G)
## [1] 0.8113075
# Passing Yards vs Offensive Rank
plot(passOff$Yds, scoreOff$Pts.G, type = "n", xlab = "Num. of Passing YDs", ylab = "Points per Game")
text(passOff$Yds, scoreOff$Pts.G, labels = passOff$Abv)

cor(passOff$Yds, scoreOff$Pts.G)
## [1] 0.5871392
# Passing Y/A vs Offensive Rank
plot(passOff$Y.A, scoreOff$Pts.G, type = "n", xlab = "Passing Yards per Attempt", ylab = "Points per Game")
text(passOff$Y.A, scoreOff$Pts.G, labels = passOff$Abv)

cor(passOff$Y.A, scoreOff$Pts.G)
## [1] 0.6993306
# Passer Rating vs Offensive Rank
plot(passOff$Rate, scoreOff$Pts.G, type = "n", xlab = "Passer Rating", ylab = "Points per Game")
text(passOff$Rate, scoreOff$Pts.G, labels = passOff$Abv)

cor(passOff$Rate, scoreOff$Pts.G)
## [1] 0.828569

Rushing Success and Offensive Success

# Rushing Attempts vs Offensive Rank
plot(rushOff$Att, scoreOff$Pts.G, type = "n", xlab = "Num. of Rushing Atts.", ylab = "Points per Game")
text(rushOff$Att, scoreOff$Pts.G, labels = rushOff$Abv.)

cor(rushOff$Att, scoreOff$Pts.G)
## [1] 0.03321405
# Rushing TDs vs Offensive Rank
plot(rushOff$TD, scoreOff$Pts.G, type = "n", xlab = "Num. of Rushing TDs", ylab = "Points per Game")
text(rushOff$TD, scoreOff$Pts.G, labels = rushOff$Abv)

cor(rushOff$TD, scoreOff$Pts.G)
## [1] 0.6077728
# Rushing YDs vs Offensive Rank
plot(rushOff$Yds, scoreOff$Pts.G, type = "n", xlab = "Num. of Rushing Yds", ylab = "Points per Game")
text(rushOff$Yds, scoreOff$Pts.G, labels = rushOff$Abv)

cor(rushOff$Yds, scoreOff$Pts.G)
## [1] 0.1730041
# Rushing Y/A vs Offensive Rank
plot(rushOff$Y.A, scoreOff$Pts.G, type = "n", xlab = "Rushing Y/A", ylab = "Points per Game")
text(rushOff$Y.A, scoreOff$Pts.G, labels = rushOff$Abv.)

cor(rushOff$Y.A, scoreOff$Pts.G)
## [1] 0.2996935

Passing Success and Team Success

#Pass Attempts vs WL%
plot(passOff$Att, nfl2022$W.L., type = "n", xlab = "Num. of Pass Atts.", ylab = "Win-Loss Percentage")
text(passOff$Att, nfl2022$W.L., labels = passOff$Abv.)

'
plot(passOff$Att[passOff$Att < 600 & passOff$Att > 550 & nfl2022$W.L.< 0.55 & nfl2022$W.L. > 0.5], nfl2022$W.L.[passOff$Att < 600 & passOff$Att > 550 & nfl2022$W.L.< 0.55 & nfl2022$W.L. > 0.5]
, type = "n", xlab = "Pass Attempts", ylab = "Win-Loss Percentage")
text(passOff$Att, nfl2022$W.L., labels = passOff$Abv.)
'
## [1] "\nplot(passOff$Att[passOff$Att < 600 & passOff$Att > 550 & nfl2022$W.L.< 0.55 & nfl2022$W.L. > 0.5], nfl2022$W.L.[passOff$Att < 600 & passOff$Att > 550 & nfl2022$W.L.< 0.55 & nfl2022$W.L. > 0.5]\n, type = \"n\", xlab = \"Pass Attempts\", ylab = \"Win-Loss Percentage\")\ntext(passOff$Att, nfl2022$W.L., labels = passOff$Abv.)\n"
cor(passOff$Att, nfl2022$W.L.)
## [1] 0.231374
# Passing TDs vs WL%
plot(passOff$TD, nfl2022$W.L., type = "n", xlab = "Num. of Passing TDs", ylab = "Win-Loss Percentage")
text(passOff$TD, nfl2022$W.L., labels = passOff$Abv)

cor(passOff$TD, nfl2022$W.L.)
## [1] 0.6893112
# Passing Yards vs  WL%
plot(passOff$Yds, nfl2022$W.L., type = "n", xlab = "Num. of Passing Yds", ylab = "Win-Loss Percentage")
text(passOff$Yds, nfl2022$W.L., labels = passOff$Abv)

cor(passOff$Yds, nfl2022$W.L.)
## [1] 0.6079146
# Passing Y/A vs  WL%
plot(passOff$Y.A, nfl2022$W.L., type = "n", xlab = "Passing Y/A", ylab = "Win-Loss Percentage")
text(passOff$Y.A, nfl2022$W.L., labels = passOff$Abv)

cor(passOff$Y.A, nfl2022$W.L.)
## [1] 0.5917355
# Passer Rating vs  WL%
plot(passOff$Rate, nfl2022$W.L., type = "n", xlab = "Passer Rating", ylab = "Win-Loss Percentage")
text(passOff$Rate,nfl2022$W.L., labels = passOff$Abv)

cor(passOff$Rate, nfl2022$W.L.)
## [1] 0.7585994

Rushing Success and Team Success

# Rushing Attempts vs  WL%
plot(rushOff$Att, nfl2022$W.L., type = "n", xlab = "Num. of Rushing Atts.", ylab = "Win-Loss Percentage")
text(rushOff$Att, nfl2022$W.L., labels = rushOff$Abv.)

cor(rushOff$Att, nfl2022$W.L.)
## [1] 0.02374545
# Rushing TDs vs  WL%
plot(rushOff$TD, nfl2022$W.L., type = "n", xlab = "Num. of Rushing TDs", ylab = "Win-Loss Percentage")
text(rushOff$TD, nfl2022$W.L., labels = rushOff$Abv)

cor(rushOff$TD, nfl2022$W.L.)
## [1] 0.4989969
# Rushing YDs vs  WL%
plot(rushOff$Yds, nfl2022$W.L., type = "n", xlab = "Num. of Rushing Yds", ylab = "Win-Loss Percentage")
text(rushOff$Yds, nfl2022$W.L., labels = rushOff$Abv)

cor(rushOff$Yds, nfl2022$W.L.)
## [1] 0.04876353
# Rushing Y/A vs  WL%
plot(rushOff$Y.A, nfl2022$W.L., type = "n", xlab = "Rushing Y/A", ylab = "Win-Loss Percentage")
text(rushOff$Y.A, nfl2022$W.L., labels = rushOff$Abv.)

cor(rushOff$Y.A, nfl2022$W.L.)
## [1] 0.08316379

Consider the Balance of Passing vs Rushing

'Note: The total TDs are strictly from the offense, so pick-sixes, punt return TDs, and so on will not count'
## [1] "Note: The total TDs are strictly from the offense, so pick-sixes, punt return TDs, and so on will not count"
RushTDsProp <- rushOff$TD/(rushOff$TD + passOff$TD)
RushTDsProp <- cbind(rushOff$Abv., RushTDsProp)

PassTDsProp <- passOff$TD/(rushOff$TD + passOff$TD)
PassTDsProp <- cbind(passOff$Abv., PassTDsProp)

RushYdsProp <- rushOff$Yds/(rushOff$Yds + passOff$Yds)
RushYdsProp <- cbind(rushOff$Abv., RushYdsProp)

PassYdsProp <- passOff$Yds/(rushOff$Yds + passOff$Yds)
PassYdsProp <- cbind(passOff$Abv., PassYdsProp)

"I'm sure there are better ways to combine the prortion of yards and TDs with team abbreviations, but this will do for now."
## [1] "I'm sure there are better ways to combine the prortion of yards and TDs with team abbreviations, but this will do for now."
#Show head of all the new data frames
print(RushTDsProp)
##             RushTDsProp        
##  [1,] "ARI" "0.46875"          
##  [2,] "ATL" "0.5"              
##  [3,] "BAL" "0.424242424242424"
##  [4,] "BUF" "0.3"              
##  [5,] "CAR" "0.5"              
##  [6,] "CHI" "0.486486486486487"
##  [7,] "CIN" "0.285714285714286"
##  [8,] "CLE" "0.5"              
##  [9,] "DAL" "0.461538461538462"
## [10,] "DEN" "0.379310344827586"
## [11,] "DET" "0.442307692307692"
## [12,] "GB"  "0.307692307692308"
## [13,] "HOU" "0.259259259259259"
## [14,] "IND" "0.32"             
## [15,] "JAX" "0.390243902439024"
## [16,] "KC"  "0.305084745762712"
## [17,] "LV"  "0.3"              
## [18,] "LAC" "0.365853658536585"
## [19,] "LAR" "0.483870967741935"
## [20,] "MIA" "0.285714285714286"
## [21,] "MIN" "0.375"            
## [22,] "NE"  "0.387096774193548"
## [23,] "NO"  "0.333333333333333"
## [24,] "NYG" "0.552631578947368"
## [25,] "NYJ" "0.464285714285714"
## [26,] "PHI" "0.56140350877193" 
## [27,] "PIT" "0.571428571428571"
## [28,] "SF"  "0.4"              
## [29,] "SEA" "0.285714285714286"
## [30,] "TB"  "0.161290322580645"
## [31,] "TEN" "0.5"              
## [32,] "WAS" "0.272727272727273"
print(PassTDsProp)
##             PassTDsProp        
##  [1,] "ARI" "0.53125"          
##  [2,] "ATL" "0.5"              
##  [3,] "BAL" "0.575757575757576"
##  [4,] "BUF" "0.7"              
##  [5,] "CAR" "0.5"              
##  [6,] "CHI" "0.513513513513513"
##  [7,] "CIN" "0.714285714285714"
##  [8,] "CLE" "0.5"              
##  [9,] "DAL" "0.538461538461538"
## [10,] "DEN" "0.620689655172414"
## [11,] "DET" "0.557692307692308"
## [12,] "GB"  "0.692307692307692"
## [13,] "HOU" "0.740740740740741"
## [14,] "IND" "0.68"             
## [15,] "JAX" "0.609756097560976"
## [16,] "KC"  "0.694915254237288"
## [17,] "LV"  "0.7"              
## [18,] "LAC" "0.634146341463415"
## [19,] "LAR" "0.516129032258065"
## [20,] "MIA" "0.714285714285714"
## [21,] "MIN" "0.625"            
## [22,] "NE"  "0.612903225806452"
## [23,] "NO"  "0.666666666666667"
## [24,] "NYG" "0.447368421052632"
## [25,] "NYJ" "0.535714285714286"
## [26,] "PHI" "0.43859649122807" 
## [27,] "PIT" "0.428571428571429"
## [28,] "SF"  "0.6"              
## [29,] "SEA" "0.714285714285714"
## [30,] "TB"  "0.838709677419355"
## [31,] "TEN" "0.5"              
## [32,] "WAS" "0.727272727272727"
print(RushYdsProp)
##             RushYdsProp        
##  [1,] "ARI" "0.340607383160575"
##  [2,] "ATL" "0.501753738231493"
##  [3,] "BAL" "0.472222222222222"
##  [4,] "BUF" "0.350888225121836"
##  [5,] "CAR" "0.424510180560891"
##  [6,] "CHI" "0.575960252245366"
##  [7,] "CIN" "0.264909847434119"
##  [8,] "CLE" "0.419615773508595"
##  [9,] "DAL" "0.380841895923102"
## [10,] "DEN" "0.350099511489054"
## [11,] "DET" "0.337306501547988"
## [12,] "GB"  "0.367798085291558"
## [13,] "HOU" "0.306224066390042"
## [14,] "IND" "0.352208380520951"
## [15,] "JAX" "0.348312757201646"
## [16,] "KC"  "0.280147895335609"
## [17,] "LV"  "0.343567495411313"
## [18,] "LAC" "0.24950884086444" 
## [19,] "LAR" "0.348291046340952"
## [20,] "MIA" "0.272067129256092"
## [21,] "MIN" "0.270301057770545"
## [22,] "NE"  "0.338818249813014"
## [23,] "NO"  "0.349312654212196"
## [24,] "NYG" "0.443798449612403"
## [25,] "NYJ" "0.311702717692734"
## [26,] "PHI" "0.379346840036287"
## [27,] "PIT" "0.37800875273523" 
## [28,] "SF"  "0.37966537966538" 
## [29,] "SEA" "0.341700133868809"
## [30,] "TB"  "0.221920597217509"
## [31,] "TEN" "0.422398414271556"
## [32,] "WAS" "0.381656277827248"
print(PassYdsProp)
##             PassYdsProp        
##  [1,] "ARI" "0.659392616839425"
##  [2,] "ATL" "0.498246261768507"
##  [3,] "BAL" "0.527777777777778"
##  [4,] "BUF" "0.649111774878164"
##  [5,] "CAR" "0.575489819439109"
##  [6,] "CHI" "0.424039747754634"
##  [7,] "CIN" "0.735090152565881"
##  [8,] "CLE" "0.580384226491405"
##  [9,] "DAL" "0.619158104076898"
## [10,] "DEN" "0.649900488510946"
## [11,] "DET" "0.662693498452012"
## [12,] "GB"  "0.632201914708442"
## [13,] "HOU" "0.693775933609958"
## [14,] "IND" "0.647791619479049"
## [15,] "JAX" "0.651687242798354"
## [16,] "KC"  "0.719852104664391"
## [17,] "LV"  "0.656432504588687"
## [18,] "LAC" "0.75049115913556" 
## [19,] "LAR" "0.651708953659048"
## [20,] "MIA" "0.727932870743908"
## [21,] "MIN" "0.729698942229455"
## [22,] "NE"  "0.661181750186986"
## [23,] "NO"  "0.650687345787804"
## [24,] "NYG" "0.556201550387597"
## [25,] "NYJ" "0.688297282307266"
## [26,] "PHI" "0.620653159963713"
## [27,] "PIT" "0.62199124726477" 
## [28,] "SF"  "0.62033462033462" 
## [29,] "SEA" "0.658299866131191"
## [30,] "TB"  "0.778079402782491"
## [31,] "TEN" "0.577601585728444"
## [32,] "WAS" "0.618343722172752"

Offensive Success Based on Passing and Rushing Proportions

#Passing Yds Prop vs Offensive Rank
plot(PassYdsProp[,2], scoreOff$Pts.G, type = "n", xlab = "Passing Yds Percentage", ylab = "Points per Game")
text(PassYdsProp[,2], scoreOff$Pts.G, labels = passOff$Abv.)

cor(as.numeric(PassYdsProp[,2]), scoreOff$Pts.G)
## [1] 0.1886544
#Passing TDs Prop vs Offensive Rank
plot(PassTDsProp[,2], scoreOff$Pts.G, type = "n", xlab = "Passing TDs Percentage", ylab = "Points per Game")
text(PassTDsProp[,2], scoreOff$Pts.G, labels = passOff$Abv.)

cor(as.numeric(PassTDsProp[,2]), scoreOff$Pts.G)
## [1] 0.06443996
#Rushing Yds Prop vs Offensive Rank
plot(RushYdsProp[,2], scoreOff$Pts.G, type = "n", xlab = "Rushing Yds Percentage", ylab = "Points per Game")
text(RushYdsProp[,2], scoreOff$Pts.G, labels = passOff$Abv.)

cor(as.numeric(RushYdsProp[,2]), scoreOff$Pts.G)
## [1] -0.1886544
# Rushing TDs Prop vs Offensive Rank
plot(RushTDsProp[,2], scoreOff$Pts.G, type = "n", xlab = "Rushing TDs Percentage", ylab = "Points per Game")
text(RushTDsProp[,2], scoreOff$Pts.G, labels = passOff$Abv.)

cor(as.numeric(RushTDsProp[,2]), scoreOff$Pts.G)
## [1] -0.06443996
"Because cbind typecasted the proportions to characters (due to the fact that we binded the values with abv. column which is a character vector) 
I had to use the as.numeric function"
## [1] "Because cbind typecasted the proportions to characters (due to the fact that we binded the values with abv. column which is a character vector) \nI had to use the as.numeric function"

Team Success Based on Passing and Rushing Proportions

#Pasing Yds Prop vs Offensive Rank
plot(PassYdsProp[,2], nfl2022$W.L., type = "n", xlab = "Passing Yds Proportion", ylab = "Win/Loss Percentage")
text(PassYdsProp[,2], nfl2022$W.L., labels = passOff$Abv.)

cor(as.numeric(PassYdsProp[,2]), nfl2022$W.L.)
## [1] 0.2805756
#Passing TDs Prop vs Offensive Rank
plot(PassTDsProp[,2], nfl2022$W.L., type = "n", xlab = "Passing TDs Proportion", ylab = "Win/Loss Percentage")
text(PassTDsProp[,2], nfl2022$W.L., labels = passOff$Abv.)

cor(as.numeric(PassTDsProp[,2]),  nfl2022$W.L.)
## [1] 0.05787127
#Rushing Yds Prop vs Offensive Rank
plot(RushYdsProp[,2], nfl2022$W.L., type = "n", xlab = "Rushing TDs Proportion", ylab = "Win/Loss Percentage")
text(RushYdsProp[,2],  nfl2022$W.L., labels = passOff$Abv.)

cor(as.numeric(RushYdsProp[,2]),  nfl2022$W.L.)
## [1] -0.2805756
# Rushing TDs Prop vs Offensive Rank
plot(RushTDsProp[,2], nfl2022$W.L., type = "n", xlab = "Rushing Yds Proportion", ylab = "Win/Loss Percentage")
text(RushTDsProp[,2],  nfl2022$W.L., labels = passOff$Abv.)

cor(as.numeric(RushTDsProp[,2]),  nfl2022$W.L.)
## [1] -0.05787127

Other Calculations

sd(rushOff$Yds)
## [1] 395.3786
sd(passOff$Yds)
## [1] 614.6549
sd(rushOff$TD)
## [1] 5.295978
sd(passOff$TD)
## [1] 6.969692
sd(passOff$Rate)
## [1] 8.177772

Passing Offense vs Rushing Y/A

plot(rushOff$Y.A, passOff$Rate, type = "n", xlab = "Rushing Y/A", ylab = "Passer Rating")
text(rushOff$Y.A, passOff$Rate, labels = rushOff$Abv.)

cor(rushOff$Y.A, passOff$Rate)
## [1] 0.1253517
plot(rushOff$Yds, passOff$Rate, type = "n", xlab = "Rushing Yards", ylab = "Passer Rating")
text(rushOff$Yds, passOff$Rate, labels = rushOff$Abv.)

cor(rushOff$Yds, passOff$Rate)
## [1] -0.003510515
plot(rushOff$Y.A, passOff$Yds, type = "n", xlab = "Rushing Y/A", ylab = "Passing Yards")
text(rushOff$Y.A, passOff$Yds, labels = rushOff$Abv.)

cor(rushOff$Y.A, passOff$Yds)
## [1] -0.362417
plot(rushOff$Yds, passOff$Yds, type = "n", xlab = "Rushing Yards", ylab = "Passing Yards")
text(rushOff$Yds, passOff$Yds, labels = rushOff$Abv.)

cor(rushOff$Yds, passOff$Yds)
## [1] -0.5673019
plot(passOff$Yds, rushOff$TD, type = "n", xlab = "Passing Yards", ylab = "Rushing TDs")
text(passOff$Yds, rushOff$TD, labels = rushOff$Abv.)

cor(passOff$Yds, rushOff$TD)
## [1] 0.01427679